<?php

class RouteHandler
{
    public function __construct($args, $paramMethod)
    {
        if (method_exists($this, $paramMethod)) {
            $this->$paramMethod($args);
        } else {
            //echo "方法不存在";
            throw new ErrorException("方法不存在！！");
        }
    }

}
